package app

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"testPaper/doc/app"
	"testPaper/model"
	"testPaper/response"
)

func WxInfo(c *gin.Context) {
	wxUser, _ := c.Get("wxUser")

	if wxUser != nil {
		response.Reponse(c, http.StatusOK, 200, gin.H{
			"data": app.WxUserDot(wxUser.(model.WxUser)),
		}, "获取成功")
		return
	} else {
		response.Reponse(c, http.StatusOK, 422, nil, "用户不存在")
		return
	}
}
